Telegram Group & Telegram Channel
πŸ–₯ PowerShell-скрипт для пСрСимСнования .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°

ΠŸΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅ .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° β€” занятиС ΡƒΡ‚ΠΎΠΌΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅:
Π½ΡƒΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΠΈ, Ρ„Π°ΠΉΠ»Ρ‹, нСэмспСйсы, Π° Ρ‚Π°ΠΊΠΆΠ΅ Π·Π°ΠΌΠ΅Π½ΠΈΡ‚ΡŒ строки Π²Π½ΡƒΡ‚Ρ€ΠΈ .sln ΠΈ .csproj Ρ„Π°ΠΉΠ»ΠΎΠ².

ΠŸΠ΅Ρ€Π΅Π΄ Π²Π°ΠΌΠΈ PowerShell-скрипт, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ΠΏΠ΅Π΅Ρ€ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅: ΠΎΠ½ рСкурсивно ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Ρ‹Π²Π°Π΅Ρ‚ ΠΏΠ°ΠΏΠΊΠΈ ΠΈ Ρ„Π°ΠΉΠ»Ρ‹ ΠΈ замСняСт содСрТимоС Π²Π½ΡƒΡ‚Ρ€ΠΈ:


$ErrorActionPreference = "Stop"

$rootFolder = Resolve-Path -Path "."
$oldName = "Sample.Foo"
$newName = "Sample.Bar"

# Rename files and folders
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse | Sort-Object -Property FullName -Descending) {
$itemNewName = $item.Name.Replace($oldName, $newName)
if ($item.Name -ne $itemNewName) {
Rename-Item -LiteralPath $item.FullName -NewName $itemNewName
}
}

# Replace content in files
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse -Include "*.cmd", "*.cs", "*.csproj", "*.json", "*.md", "*.proj", "*.props", "*.ps1", "*.sln", "*.slnx", "*.targets", "*.txt", "*.vb", "*.vbproj", "*.xaml", "*.xml", "*.xproj", "*.yml", "*.yaml") {
$content = Get-Content -LiteralPath $item.FullName
if ($content) {
$newContent = $content.Replace($oldName, $newName)
Set-Content -LiteralPath $item.FullName -Value $newContent
}
}


@csharp_ci
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/csharp_ci/1357
Create:
Last Update:

πŸ–₯ PowerShell-скрипт для пСрСимСнования .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°

ΠŸΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅ .NET-ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° β€” занятиС ΡƒΡ‚ΠΎΠΌΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅:
Π½ΡƒΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Ρ‚ΡŒ ΠΏΠ°ΠΏΠΊΠΈ, Ρ„Π°ΠΉΠ»Ρ‹, нСэмспСйсы, Π° Ρ‚Π°ΠΊΠΆΠ΅ Π·Π°ΠΌΠ΅Π½ΠΈΡ‚ΡŒ строки Π²Π½ΡƒΡ‚Ρ€ΠΈ .sln ΠΈ .csproj Ρ„Π°ΠΉΠ»ΠΎΠ².

ΠŸΠ΅Ρ€Π΅Π΄ Π²Π°ΠΌΠΈ PowerShell-скрипт, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ΠΏΠ΅Π΅Ρ€ΠΈΠΌΠ΅Π½ΠΎΠ²Π°Π½ΠΈΠ΅: ΠΎΠ½ рСкурсивно ΠΏΠ΅Ρ€Π΅ΠΈΠΌΠ΅Π½ΠΎΠ²Ρ‹Π²Π°Π΅Ρ‚ ΠΏΠ°ΠΏΠΊΠΈ ΠΈ Ρ„Π°ΠΉΠ»Ρ‹ ΠΈ замСняСт содСрТимоС Π²Π½ΡƒΡ‚Ρ€ΠΈ:


$ErrorActionPreference = "Stop"

$rootFolder = Resolve-Path -Path "."
$oldName = "Sample.Foo"
$newName = "Sample.Bar"

# Rename files and folders
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse | Sort-Object -Property FullName -Descending) {
$itemNewName = $item.Name.Replace($oldName, $newName)
if ($item.Name -ne $itemNewName) {
Rename-Item -LiteralPath $item.FullName -NewName $itemNewName
}
}

# Replace content in files
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse -Include "*.cmd", "*.cs", "*.csproj", "*.json", "*.md", "*.proj", "*.props", "*.ps1", "*.sln", "*.slnx", "*.targets", "*.txt", "*.vb", "*.vbproj", "*.xaml", "*.xml", "*.xproj", "*.yml", "*.yaml") {
$content = Get-Content -LiteralPath $item.FullName
if ($content) {
$newContent = $content.Replace($oldName, $newName)
Set-Content -LiteralPath $item.FullName -Value $newContent
}
}


@csharp_ci

BY C# (C Sharp) programming


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/csharp_ci/1357

View MORE
Open in Telegram


C C Sharp programming Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Work?

Bitcoin is built on a distributed digital record called a blockchain. As the name implies, blockchain is a linked body of data, made up of units called blocks that contain information about each and every transaction, including date and time, total value, buyer and seller, and a unique identifying code for each exchange. Entries are strung together in chronological order, creating a digital chain of blocks. β€œOnce a block is added to the blockchain, it becomes accessible to anyone who wishes to view it, acting as a public ledger of cryptocurrency transactions,” says Stacey Harris, consultant for Pelicoin, a network of cryptocurrency ATMs. Blockchain is decentralized, which means it’s not controlled by any one organization. β€œIt’s like a Google Doc that anyone can work on,” says Buchi Okoro, CEO and co-founder of African cryptocurrency exchange Quidax. β€œNobody owns it, but anyone who has a link can contribute to it. And as different people update it, your copy also gets updated.”

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

C C Sharp programming from sg


Telegram C# (C Sharp) programming
FROM USA